<?php
/**
 * Created by PhpStorm.
 * User: Jerry
 * Date: 2016/12/21
 * Time: 10:54
 */

namespace SDXApi\Model;


use Think\Model;

/**
 * Class HomeTemplateStencilFontModel
 * @package SDXApi\Model
 */
class HomeTemplateStencilFontModel extends Model
{

	/**
	 * @var string
	 */
	protected $tableName = 'home_template_stencil_font';


	/**
	 * Created by Jerry
	 * @param $stencil_id
	 * @return mixed
	 */
	public function find_template_stencil_font_by_stencil_id($stencil_id)
	{
		$where = array(
			'stencil_id'	=>	$stencil_id,
		);

		return $this->where($where)->find();
	}

	/**
	 * Created by Jerry
	 * @param int $stencil_id
	 * @return mixed
	 */
	public function find_template_stencil_font_notice_by_stencil_id($stencil_id = 0)
	{
		$where = array(
			'stencil_id'	=>	$stencil_id,
		);

		$field = 'content, link';

		return $this->field($field)->where($where)->select();
	}
}